home *** CD-ROM | disk | FTP | other *** search
/ Macwelt 1 / Macwelt DVD 1.toast / Web-Publishing / HTML-Editoren / Alpha ƒ / Mode Examples / Setext-Example.stx.tcl < prev    next >
Encoding:
Text File  |  2000-12-04  |  1.6 KB  |  41 lines

  1. ## -*-Tcl-*-
  2.  # ==========================================================================
  3.  #  Mode Examples - a Help package for Alpha
  4.  # 
  5.  #  FILE: "Setext-Example.setx"
  6.  #                                    created: 10/17/00 {02:18:43 pm} 
  7.  #                                last update: 12/04/00 {03:29:36 pm} 
  8.  #  Description: 
  9.  #  
  10.  #  Script for the "Setext Example" in the Mode Examples package.
  11.  # 
  12.  #  Author: Craig Barton Upright
  13.  #  E-mail: <cupright@princeton.edu>
  14.  #    mail: Princeton University, Department of Sociology
  15.  #          Princeton, New Jersey 08544
  16.  #     www: <http://www.princeton.edu/~cupright>
  17.  #  
  18.  # ==========================================================================
  19.  ##
  20.  
  21. set f [file join $HOME Help "Setext Help"]
  22. set m Setx
  23. new -n "* $m Mode Example *" -m $m -text [file::readAll $f] -shell 1
  24. goto [minPos]
  25. set    t "\r  $m mode example  --  Modify as much as you like ! \r\r"
  26. append t "  None of the changes you make will affect the actual file.  If you close \r"
  27. append t "  the window and then click on the hyperlink again, you will start with the \r"
  28. append t "  same example as before.  This also means that you cannot send this window \r"
  29. append t "  to other applications -- technically, it doesn't exist as a file. \r\r"
  30. # Find out if there's a tutorial available for this mode.
  31. set f2 [file join ${HOME} Tcl Completions "Setx Tutorial"]
  32. if {[llength [glob -nocomplain -path $f2 *]] == 1} {
  33.     append t "  $m mode also has a Completions Tutorial in the Config --> Mode Prefs menu.\r\r"
  34. }
  35. insertText  $t
  36. goto [minPos]
  37. # Now try to mark the file.
  38. markFile
  39.  
  40. catch {unset f}
  41. catch {unset m}